# sprite = codesters.Circle(x, y, diameter, "color")
sun = codesters.Circle(-150, 175, 75, "gold")
# sprite = codesters.Square(x, y, width, "color")
house = codesters.Square(0, -125, 250, "blue")
try:
tval1 = str(house.get_color())
except:
tval1 = "DNE"
t1 = TestObjective()
t1.add_success(tval1 == "purple", "Great Job!")
t1.add_failure(tval1 == "blue", "Did you change the square's color?")
t1.add_failure(tval1 == "DNE", "Did you delete your house?")
t1.add_creative(tval1 != "purple" and tval1 != "blue", "Creative choice!")
tester = TestManager()
tester.add_test_list([t1])
tester.run_tests()
tester.display_first_feedback()
-
Run Code
-
Activity Submitted!
Submit Work
-
Next Activity
-
Stop Running Code
-
Show Chart
-
Show Console
-
Reset Code Editor
-
Codesters How To (opens in a new tab)